3.544 \(\int \frac{\sec ^6(c+d x)}{a+b \tan (c+d x)} \, dx\)

Optimal. Leaf size=116 \[ \frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d} \]

[Out]

((a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(b^5*d) - (a*(a^2 + 2*b^2)*Tan[c + d*x])/(b^4*d) + ((a^2 + 2*b^2)*Tan[
c + d*x]^2)/(2*b^3*d) - (a*Tan[c + d*x]^3)/(3*b^2*d) + Tan[c + d*x]^4/(4*b*d)

________________________________________________________________________________________

Rubi [A]  time = 0.101835, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^6/(a + b*Tan[c + d*x]),x]

[Out]

((a^2 + b^2)^2*Log[a + b*Tan[c + d*x]])/(b^5*d) - (a*(a^2 + 2*b^2)*Tan[c + d*x])/(b^4*d) + ((a^2 + 2*b^2)*Tan[
c + d*x]^2)/(2*b^3*d) - (a*Tan[c + d*x]^3)/(3*b^2*d) + Tan[c + d*x]^4/(4*b*d)

Rule 3506

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(b*f), Subst
[Int[(a + x)^n*(1 + x^2/b^2)^(m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x] && NeQ[a^2 + b
^2, 0] && IntegerQ[m/2]

Rule 697

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(a + c*
x^2)^p, x], x] /; FreeQ[{a, c, d, e, m}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0]

Rubi steps

\begin{align*} \int \frac{\sec ^6(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^2}{a+x} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{a \left (-a^2-2 b^2\right )}{b^4}+\frac{\left (a^2+2 b^2\right ) x}{b^4}-\frac{a x^2}{b^4}+\frac{x^3}{b^4}+\frac{\left (a^2+b^2\right )^2}{b^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d}\\ \end{align*}

Mathematica [A]  time = 1.21426, size = 99, normalized size = 0.85 \[ \frac{6 b^2 \left (a^2+b^2\right ) \tan ^2(c+d x)-12 a b \left (a^2+2 b^2\right ) \tan (c+d x)+12 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))-4 a b^3 \tan ^3(c+d x)+3 b^4 \sec ^4(c+d x)}{12 b^5 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^6/(a + b*Tan[c + d*x]),x]

[Out]

(12*(a^2 + b^2)^2*Log[a + b*Tan[c + d*x]] + 3*b^4*Sec[c + d*x]^4 - 12*a*b*(a^2 + 2*b^2)*Tan[c + d*x] + 6*b^2*(
a^2 + b^2)*Tan[c + d*x]^2 - 4*a*b^3*Tan[c + d*x]^3)/(12*b^5*d)

________________________________________________________________________________________

Maple [A]  time = 0.08, size = 162, normalized size = 1.4 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{4}}{4\,bd}}-{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,{b}^{2}d}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}{a}^{2}}{2\,d{b}^{3}}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{bd}}-{\frac{{a}^{3}\tan \left ( dx+c \right ) }{d{b}^{4}}}-2\,{\frac{a\tan \left ( dx+c \right ) }{{b}^{2}d}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{4}}{d{b}^{5}}}+2\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{2}}{d{b}^{3}}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{bd}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^6/(a+b*tan(d*x+c)),x)

[Out]

1/4*tan(d*x+c)^4/b/d-1/3*a*tan(d*x+c)^3/b^2/d+1/2/d/b^3*tan(d*x+c)^2*a^2+tan(d*x+c)^2/b/d-1/d/b^4*a^3*tan(d*x+
c)-2*a*tan(d*x+c)/b^2/d+1/d/b^5*ln(a+b*tan(d*x+c))*a^4+2/d/b^3*ln(a+b*tan(d*x+c))*a^2+ln(a+b*tan(d*x+c))/b/d

________________________________________________________________________________________

Maxima [A]  time = 1.14714, size = 146, normalized size = 1.26 \begin{align*} \frac{\frac{3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \,{\left (a^{2} b + 2 \, b^{3}\right )} \tan \left (d x + c\right )^{2} - 12 \,{\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (d x + c\right )}{b^{4}} + \frac{12 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="maxima")

[Out]

1/12*((3*b^3*tan(d*x + c)^4 - 4*a*b^2*tan(d*x + c)^3 + 6*(a^2*b + 2*b^3)*tan(d*x + c)^2 - 12*(a^3 + 2*a*b^2)*t
an(d*x + c))/b^4 + 12*(a^4 + 2*a^2*b^2 + b^4)*log(b*tan(d*x + c) + a)/b^5)/d

________________________________________________________________________________________

Fricas [A]  time = 2.13068, size = 439, normalized size = 3.78 \begin{align*} \frac{6 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\cos \left (d x + c\right )^{2}\right ) + 3 \, b^{4} + 6 \,{\left (a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} - 4 \,{\left (a b^{3} \cos \left (d x + c\right ) +{\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{12 \, b^{5} d \cos \left (d x + c\right )^{4}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="fricas")

[Out]

1/12*(6*(a^4 + 2*a^2*b^2 + b^4)*cos(d*x + c)^4*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 - b^2)*cos(d*x + c)^
2 + b^2) - 6*(a^4 + 2*a^2*b^2 + b^4)*cos(d*x + c)^4*log(cos(d*x + c)^2) + 3*b^4 + 6*(a^2*b^2 + b^4)*cos(d*x +
c)^2 - 4*(a*b^3*cos(d*x + c) + (3*a^3*b + 5*a*b^3)*cos(d*x + c)^3)*sin(d*x + c))/(b^5*d*cos(d*x + c)^4)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{6}{\left (c + d x \right )}}{a + b \tan{\left (c + d x \right )}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**6/(a+b*tan(d*x+c)),x)

[Out]

Integral(sec(c + d*x)**6/(a + b*tan(c + d*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.73845, size = 162, normalized size = 1.4 \begin{align*} \frac{\frac{3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} + 12 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) - 24 \, a b^{2} \tan \left (d x + c\right )}{b^{4}} + \frac{12 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}}}{12 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^6/(a+b*tan(d*x+c)),x, algorithm="giac")

[Out]

1/12*((3*b^3*tan(d*x + c)^4 - 4*a*b^2*tan(d*x + c)^3 + 6*a^2*b*tan(d*x + c)^2 + 12*b^3*tan(d*x + c)^2 - 12*a^3
*tan(d*x + c) - 24*a*b^2*tan(d*x + c))/b^4 + 12*(a^4 + 2*a^2*b^2 + b^4)*log(abs(b*tan(d*x + c) + a))/b^5)/d